{extend name='public/base' /}

{block name="content"}
<style type="text/css">
    html {
        background-color: #fff !important;
    }

    .center {
        text-align: center !important;
    }
</style>
<div class="layui-col-md12">
    {if condition="$type eq 2"}
    <div class="center" style="font-size: 20px">{$list[0]['dataTime']} {$list[0]['name']} /电量/电费 明细表</div>
    <div class="" id="my-table">
        <table class="layui-table">
            <thead>
            <tr>
                <td>表号</td>
                <td>表名称</td>
                <td>上次抄表指数</td>
                <td>本期抄表指数</td>
                <td>实际用电指数</td>
                <td>倍率</td>
                <td>实际电量(度)</td>
                <td>电价</td>
                <td>费用明细(元)</td>
            </tr>
            </thead>
            <tbody class="role_list">
            {foreach $list as $key=>$id}
            <tr>
                <td>{$id.pointId}</td>
                <td>{$id.pointName}</td>
                <td>{$id.zongStart}</td>
                <td>{$id.zongEnd}</td>
                <td>{$id.zongEnd-$id.zongStart}</td>
                <td>{$id.rate}</td>
                <td>{$id.electricity}</td>
                <td>{$id.price}</td>
                <td>{$id.money}</td>
            </tr>

            {/foreach}
            </tbody>

        </table>
    </div>
    {else/}
    <div class="center" style="font-size: 20px">{$list[0]['dataTime']} {$list[0]['name']} /电量/电费 明细表</div>

    {foreach $list as $key=>$id}
    <div>电表编号:{$id.pointId}-----电表名称:{$id.pointName}</div>
    <table class="layui-table">
        <thead>
        <tr>
            <th class="center">项目</th>
            <td>上次抄表指数</td>
            <td>本期抄表指数</td>
            <td>实际用电指数</td>
            <td>倍率</td>
            <th class="center">实际用量</th>
            <th class="center">电价</th>
            <th class="center">费用明细</th>
            <th class="center">小计</th>
            <th class="center">合计</th>
        </tr>
        </thead>
        <tbody class="role_list">
        <tr>
            <td class="center">峰</td>
            <td class="center">{if $id.fengStart>0}{$id.fengStart}{else}{/if}</td>
            <td class="center">{if $id.fengEnd>0}{$id.fengEnd}{else}{/if}</td>
            <td class="center">{if $id.fengPower>0}{$id.fengPower}{else}{/if}</td>
            <td class="center">{$id.rate}</td>
            <td class="center">{$id.fele}</td>
            <td class="center">{$id.fMoney}</td>
            <td class="center">{$id.fmoney}</td>
            <td class="center" rowspan="4">{$id.subtotal}</td>
            <td class="center" rowspan="5">{$id.money}</td>
        </tr>
        <tr>
            <td class="center">谷</td>
            <td class="center">{if $id.guStart>0}{$id.guStart}{else}{/if}</td>
            <td class="center">{if $id.guEnd>0}{$id.guEnd}{else}{/if}</td>
            <td class="center">{if $id.guPower>0}{$id.guPower}{else}{/if}</td>
            <td class="center">{$id.rate}</td>
            <td class="center">{$id.gele}</td>
            <td class="center">{$id.gMoney}</td>
            <td class="center">{$id.gmoney}</td>
        </tr>
        <tr>
            <td class="center">平</td>
            <td class="center">{if $id.pingStart>0}{$id.pingStart}{else}{/if}</td>
            <td class="center">{if $id.pingEnd>0}{$id.pingEnd}{else}{/if}</td>
            <td class="center">{if $id.pingPower>0}{$id.pingPower}{else}{/if}</td>
            <td class="center">{$id.rate}</td>
            <td class="center">{$id.pele}</td>
            <td class="center">{$id.pMoney}</td>
            <td class="center">{$id.pmoney}</td>
        </tr>
        <tr>
            <td class="center">加计电费</td>
            <td class="center">0</td>
            <td class="center">0</td>
            <td class="center">0</td>
            <td class="center">0</td>
            <td class="center">0</td>
            <td class="center">0</td>
            <td class="center">{$id.jiaji}</td>
        </tr>
        <tr>
            <td class="center">公区分摊</td>
            <td class="center">0</td>
            <td class="center">0</td>
            <td class="center">0</td>
            <td class="center">1</td>
            <td class="center">{$id.electricity}</td>
            <td class="center">{$id.tMoney}</td>
            <td class="center">{$id.tmoney}</td>
            <td class="center">{$id.tmoney}</td>
        </tr>

        </tbody>
    </table>
    {/foreach}


    {/if}
</div>
{/block}

{block name="js"} <!--js处理区-->
{/block}
